using System;
using System.Collections.Generic;
using CMS.Core.DataInterfaces;

namespace CMS.Data
{
    public class NHibernateDaoFactory : IDaoFactory
    {
        #region Create Instance
        private static NHibernateDaoFactory instance = null;

        protected NHibernateDaoFactory()
        {

        }

        public static NHibernateDaoFactory Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new NHibernateDaoFactory();
                }
                return instance;
            }
        }
        #endregion

        #region Interfaces for Categories
        public ICauHinhBCDao GetCauHinhBCDao()
        {
            return CauHinhBCDao.Instance;
        }
        public ILinhVucDao GetLinhVucDao()
        {
            return LinhVucDao.Instance;
        }
        public ILoaiDonDao GetLoaiDonDao()
        {
            return LoaiDonDao.Instance;
        }
        public IDiaBanDao GetDiaBanDao()
        {
            return DiaBanDao.Instance;
        }
        public INguoiSuDungDao GetNguoiSuDungDao()
        {
            return NguoiSuDungDao.Instance;
        }
        public IPhongBanDao GetPhongBanDao()
        {
            return PhongBanDao.Instance;
        }
        
        #endregion

        #region Interface for Business

        public IFileDinhKemDao GetFileDinhKemDao()
        {
            return FileDinhKemDao.Instance;
        }
        public IChuyenTiepDao GetChuyenTiepDao()
        {
            return ChuyenTiepDao.Instance;
        }

        public IDonThuDao GetDonThuDao()
        {
            return DonThuDao.Instance;
        }

        public IDonThuVBCDDao GetDonThuVBCDDao()
        {
            return DonThuVBCDDao.Instance;
        }
        public ICongDanDao GetCongDanDao()
        {
            return CongDanDao.Instance;
        }
        public ILanhDaoDao GetLanhDaoDao()
        {
            return LanhDaoDao.Instance;
        }
        public ILoaiHinhDao GetLoaiHinhDao()
        {
            return LoaiHinhDao.Instance;
        }
        
        public ITiepDanDao GetTiepDanDao()
        {
            return TiepDanDao.Instance;
        }       
        
        #endregion        
        

        #region Interface for Access Rights

        public IChucNangDao GetChucNangDao()
        {
            return ChucNangDao.Instance;
        }

        public INhomNguoiSuDungDao GetNhomNguoiSuDungDao()
        {
            return NhomNguoiSuDungDao.Instance;
        }

        public IPhanQuyenNguoiSuDungDao GetPhanQuyenNguoiSuDungDao()
        {
            return PhanQuyenNguoiSuDungDao.Instance;
        }

        public IPhanQuyenNhomDao GetPhanQuyenNhomDao()
        {
            return PhanQuyenNhomDao.Instance;
        }

        public IVaiTroDao GetVaiTroDao()
        {
            return VaiTroDao.Instance;
        }

        public IKiemTraQuyenDao GetKiemTraQuyenDao()
        {
            return KiemTraQuyenDao.Instance;
        }

        #endregion
        
        #region Articles
        public IBaiVietDao GetBaiVietDao()
        {
            return BaiVietDao.Instance;
        }
        public IBaiVietTheLoaiDao GetBaiVietTheLoaiDao()
        {
            return BaiVietTheLoaiDao.Instance;
        }
        public IGopYDao GetGopYDao()
        {
            return GopYDao.Instance;
        }
        public IThongBaoDao GetThongBaoDao()
        {
            return ThongBaoDao.Instance;
        }
        public IVanBanDao GetVanBanDao()
        {
            return VanBanDao.Instance;
        }
        public IVBGQDao GetVBGQDao()
        {
            return VBGQDao.Instance;
        }
        public ILichTiepDao GetLichTiepDao()
        {
            return LichTiepDao.Instance;
        }
        public ITroGiupDao GetTroGiupDao()
        {
            return TroGiupDao.Instance;
        }
        #endregion
    }
}
